
<?php
require_once("../inc/conn.php");
require_once("../inc/session.php");
//获取传递来的id
$getid=$_GET["id"];

//定义删除语句
$sql="delete from userinfo where id=".$getid;
//执行sql
$rs=$conn->query($sql);

//判断成功是否
if($rs){
	echo "<script>alert('删除成功！');location.href='userlist.php';</script>";
}else{
	echo "<script>alert('删除失败！');location.href='userlist.php';</script>";
}
?>